The fundamental truth is that a website isn't just a brochure for you to read. For the web to be useful, it needs a way to collect information from the user and send it back to the server.
Without this, you couldn't log in, search for a video, buy a product, post a comment, or send a message. The web would be a read-only library.
How do we create a standardized, reliable system to:
The logical solution to this entire problem is the HTML <form>.
<input type="text">
<form>
<input type="text">
</form>
<label>First Name:</label>
<input type="text">
<label for="firstName">First Name:</label>
<input type="text" id="firstName">
<form>
<label for="firstName">First Name:</label>
<input type="text" id="firstName">
<br><br>
<label for="lastName">Last Name:</label>
<input type="text" id="lastName">
<br><br>
<input type="submit">
</form>
<input type="text" id="firstName" name="firstName">
<input type="radio" id="sizeS" name="shirtSize" value="small">
<label for="sizeS">Small</label>
<input type="checkbox" id="toppingPep" name="toppings" value="pepperoni">
<label for="toppingPep">Pepperoni</label>
<button type="submit"><strong>Submit</strong> Your Order</button>
<textarea id="comments" name="comments" rows="4" cols="50"></textarea>
<select id="country" name="country">
<option value="">--Please choose an option--</option>
<option value="in">India</option>
</select>
The fundamental truth is that a webpage should be able to deliver any kind of content, not just static text and pictures.
<video src="my-awesome-video.mp4" controls></video>
<audio src="audio/theme-song.mp3" controls></audio>
<footer>
<p>Copyright © 2024 My Awesome Website. All Rights Reserved.</p>
</footer>